<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>AVL树可视化</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
  <div class="container">
    <div class="controls">
      <input type="text" id="tree-input" placeholder="输入先序遍历序列，如：5,2,1,3,7,8">
      <button id="generate-btn">生成二叉搜索树</button>
      <button id="check-avl-btn">判断是否为AVL树</button>
      <div id="operation-buttons" class="disabled">
        <button id="search-btn">搜索</button>
        <button id="insert-btn">插入</button>
        <button id="delete-btn">删除</button>
        <button id="ascend-btn">Ascend</button>
        <button id="index-search-btn">按排名搜索</button>
        <button id="index-delete-btn">按排名删除</button>
      </div>
    </div>
    <div class="visualization">
      <canvas id="tree-canvas"></canvas>
    </div>
  </div>
  <script src="avl-tree.js"></script>
  <script src="visualization.js"></script>
  <script src="main.js"></script>
</body>
</html>
